//
//  PrescriptionOrderPayResultWaitView.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2023/1/10.
//  Copyright © 2023 QDSG. All rights reserved.
//

import UIKit

class PrescriptionOrderPayResultWaitView: UIView {
    init() {
        super.init(frame: .zero)
        layer.cornerRadius = 10
        layer.masksToBounds = true
        backgroundColor = .white
        
        let icon0 = UIImageView(image: UIImage(named: "pay_circle_fill_style2"))
        addSubview(icon0)
        icon0.snp.makeConstraints { make in
            make.left.equalTo(24)
            make.top.equalTo(24)
        }

        let title0 = UILabel()
        addSubview(title0)
        title0.snp.makeConstraints { make in
            make.left.equalTo(icon0.snp.right).offset(10)
            make.centerY.equalTo(icon0)
        }
        title0.text = "医保结果确认中"
        title0.font = .medium(15)
        title0.textColor = .init(hex: "#4E7DFB")

        let icon1 = UIImageView(image: UIImage(named: "pay_circle"))
        addSubview(icon1)
        icon1.snp.makeConstraints { make in
            make.centerX.equalTo(icon0)
            make.top.equalTo(icon0.snp.bottom).offset(55)
        }

        let title1 = UILabel()
        addSubview(title1)
        title1.snp.makeConstraints { make in
            make.left.equalTo(icon1.snp.right).offset(10)
            make.centerY.equalTo(icon1)
        }
        title1.text = "医保支付成功"
        title1.font = .medium(15)
        title1.textColor = .init(hex: "#4E7DFB")
        
        
        let icon2 = UIImageView(image: UIImage(named: "pay_circle"))
        addSubview(icon2)
        icon2.snp.makeConstraints { make in
            make.centerX.equalTo(icon1)
            make.top.equalTo(icon1.snp.bottom).offset(55)
            make.bottom.equalTo(-30)
        }
        
        let title2 = UILabel()
        addSubview(title2)
        title2.snp.makeConstraints { make in
            make.left.equalTo(icon2.snp.right).offset(10)
            make.centerY.equalTo(icon2)
        }
        title2.text = "医保支付成功"
        title2.font = .medium(15)
        title2.textColor = .init(hex: "#4E7DFB")
        
        let line0 = UIView()
        addSubview(line0)
        line0.snp.makeConstraints { make in
            make.centerX.equalTo(icon0)
            make.top.equalTo(icon0.snp.bottom)
            make.bottom.equalTo(icon1.snp.top)
            make.width.equalTo(2)
        }
        line0.backgroundColor = .init(hex: "#F1EDED")
        
        let line1 = UIView()
        addSubview(line1)
        line1.snp.makeConstraints { make in
            make.centerX.width.top.equalTo(line0)
            make.height.equalTo(35)
        }
        line1.backgroundColor = .mainColor
        
        let line2 = UIView()
        addSubview(line2)
        line2.snp.makeConstraints { make in
            make.centerX.width.equalTo(line0)
            make.top.equalTo(icon1.snp.bottom)
            make.bottom.equalTo(icon2.snp.top)
        }
        line2.backgroundColor = .init(hex: "#F1EDED")
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

